package yunquan.wang.modules.base.entity;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import yunquan.wang.base.domain.IdEntity;

//码表

@Entity
@Table(name = "BASE_CODETYPE")
public class CodeType extends IdEntity{
	/**
	 * 
	 */
	private static final long serialVersionUID = 3302072285582614068L;
	private String type;//code type like: customer level
	private String name;//International Name;
	private String cnName;//ChineseName;
	private String valueType;// String Integer Date Long....
	private Boolean editable; //是否可编辑
	
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "codeType")
	private Set<CodeValue>  codeValues=new HashSet<CodeValue>();
	
	
	public Boolean getEditable() {
		return editable;
	}
	public void setEditable(Boolean editable) {
		this.editable = editable;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getCnName() {
		return cnName;
	}
	public void setCnName(String cnName) {
		this.cnName = cnName;
	}
	public String getValueType() {
		return valueType;
	}
	public void setValueType(String valueType) {
		this.valueType = valueType;
	}
	public Set<CodeValue> getCodeValues() {
		return codeValues;
	}
	public void setCodeValues(Set<CodeValue> codeValues) {
		this.codeValues = codeValues;
	}
	 
	
	
}
